<!DOCTYPE html>
<html>
<head>
  	<title>进销存管理系统</title>
  	<#import "/common/common.macro.ftl" as netCommon>
	<@netCommon.commonStyle />
	<!-- DataTables -->
  	<link rel="stylesheet" href="${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.css">
	<link rel="stylesheet" href="${request.contextPath}/static/adminlte/plugins/select2/select2.min.css">
	<#-- select2
    <link rel="stylesheet" href="${request.contextPath}/static/adminlte/plugins/select2/select2.min.css">
    <script src="${request.contextPath}/static/adminlte/plugins/select2/select2.min.js"></script>
    //$(".select2").select2();
    -->
	<style>
		th{
			text-align: center;
			width:9%
		}
		.tdBu{
			width:1%
		}
		td{
			text-align: center;
			width:9%
		}
		.row {
		  margin-top: 4px;
		  margin-bottom: 4px;
		}
		.mybox {
		  margin-top: 4px;
		  margin-bottom: 4px;
		}
		.summerButton{
			margin-top: 4px;
		}
	</style>
</head>
<body class="hold-transition skin-blue sidebar-mini <#if cookieMap?exists && "off" == cookieMap["adminlte_settings"].value >sidebar-collapse</#if>">
<div class="wrapper">
	<!-- header -->
	<@netCommon.commonHeader />
	<!-- left -->
	<@netCommon.commonLeft "inorderin" />
	
	<!-- Content Wrapper. Contains page content -->
	<div class="content-wrapper">
		<!-- Content Header (Page header) -->
		<section class="content-header">
			<h1>采购订单</h1>
		</section>
		
		<!-- Main content -->
	    <section class="content">
	   	 <#--基础信息-->
                <div class="box box-primary" style="margin-bottom: 4px;">
                    <div class="box-header with-border">
                        <label class="col-sm-1 control-label">选择客户</label>
                            <div class="col-sm-3">
                                <select id="selectCustomer" class="form-control" style="width: 100%;" name="customerid">
                                	<option value="0">请选择客户</option>
                                    <#if customerList?exists && customerList?size gt 0>
                                        <#list customerList as group>
                                            <option value="${group.tc_customerid}">${group.tc_customername}</option>
                                        </#list>
                                    </#if>
                                </select>
                            </div>
                            <#--<label class="col-sm-1 control-label">选择存放仓库</label>
                            <div class="col-sm-3">
                                <select id="mywareHouse" class="form-control" style="width: 100%;">
                                	<option value="0">请选择仓库</option>
                                    <#if warehouseList?exists && warehouseList?size gt 0>
                                        <#list warehouseList as group>
                                            <option value="${group}">${group}</option>
                                        </#list>
                                    </#if>
                                </select>
                            </div>-->
                        <div class="box-tools pull-right">
                            <button class="btn btn-info btn-xs" onclick="submitOrder()" >保存采购订单</button>
                        </div>
                    </div>

                    <div id="cable_model" class="box-body">
                        <div class="form-group">
	                        <table id="dataTable" class="table">
	                        	<thead>
		                        	<tr>
		                        		<th>线缆型号</th>
		                        		<th>线缆规格</th>
		                        		<th>单位</th>
		                        		<th>线缆颜色</th>
		                        		<th>线缆质量</th>
		                        		<th>入库仓库</th>
		                        		<th>数量</th>
		                        		<th>单价</th>
		                        		<th>折扣</th>
		                        		<th>小计</th>
		                        		<th class="tdBu">
		                        			<div class="box-tools pull-right">
		                            			<button type="button" class="btn btn-box-tool" id="cablemodel_add" ><i class="fa fa-plus"></i></button>
		                        			</div>
		                        		</th>
		                        	</tr>
	                        	</thead>
	                        	<tbody>
		                        	<tr>
		                            	<td>
		                            		<select class="form-control selectModel" style="width:100%">
	                                			<option value="0">请选择</option>
	                                    			<#if cableModelList?exists && cableModelList?size gt 0>
	                                        			<#list cableModelList as group>
	                                            			<option value="${group}">${group}</option>
	                                        			</#list>
	                                    			</#if>
	                                		</select>
		                            	</td>
		                            	<td>
		                            		<select id="selectModel1" class="form-control selectStandard" style="width:100%">
	                                			<option value="0">请选择</option>
	                                		</select>
		                            	</td>
		                            	<td>
		                            		<select id="selectModel1" class="form-control selectUnit" style="width:100%">
	                                			<option value="0">请选择</option>
	                                			<#if unitList?exists && unitList?size gt 0>
	                                        		<#list unitList as group>
	                                            		<option value="${group}">${group}</option>
	                                        		</#list>
	                                    		</#if>
	                                		</select>
		                            	</td>
		                            	<td>
		                            		<select id="selectModel" class="form-control selectcolor" style="width:100%">
	                                			<option value="0">请选择</option>
	                                			<#if colorList?exists && colorList?size gt 0>
	                                        		<#list colorList as group>
	                                            		<option value="${group}">${group}</option>
	                                        		</#list>
	                                    		</#if>
	                                		</select>
		                            	</td>
		                            	<td>
		                            		<select id="selectModel" class="form-control selectQuality" style="width:100%">
	                                			<option value="0">请选择</option>
	                                			<#if qualityList?exists && qualityList?size gt 0>
	                                        		<#list qualityList as group>
	                                            		<option value="${group}">${group}</option>
	                                        		</#list>
	                                    		</#if>
	                                		</select>
		                            	</td>
		                            	<td>
		                            		<select id="selectModel" class="form-control selectHouse" style="width:100%">
	                                			<option value="0">请选择</option>
	                                			<#if warehouseList?exists && warehouseList?size gt 0>
			                                        <#list warehouseList as group>
			                                            <option value="${group}">${group}</option>
			                                        </#list>
			                                    </#if>
	                                		</select>
		                            	</td>
		                            	<td>
		                            		<input class="form-control selectNum" type="text" style="width:100%"/>
		                            	</td>
		                            	<td>
		                            		<input class="form-control selectPrice" type="text" style="width:100%"/>
		                            	</td>
		                            	<td>
		                            		<input class="form-control selectZhe" value="1" type="text" style="width:100%"/>
		                            	</td>
		                            	<td>
		                            		<input class="form-control selectXiao" type="text" style="width:100%"/>
		                            	</td>
		                        		<td class="tdBu">
		                        			<div class="box-tools pull-right">
		                            			<button type="button" class="btn btn-box-tool delete"><i class="fa fa-fw fa-close"></i></button>
		                        			</div>
		                        		</td>
		                        	</tr>
	                        	</tbody>
	                        </table>
                        </div>
                    </div>
                        <div id="cablemodel_exmaple" style="display: none;">
                        <table>
	                        	<tr>
	                            	<td>
	                            		<select class="form-control selectModel" style="width:100%">
                                			<option value="0">请选择</option>
                                    			<#if cableModelList?exists && cableModelList?size gt 0>
                                        			<#list cableModelList as group>
                                            			<option value="${group}">${group}</option>
                                        			</#list>
                                    			</#if>
                                		</select>
	                            	</td>
	                            	<td>
	                            		<select class="form-control selectStandard" style="width:100%">
                                			<option value="0">请选择</option>
                                		</select>
	                            	</td>
	                            	<td>
	                            		<select class="form-control selectUnit" style="width:100%">
                                			<option value="0">请选择</option>
                                			<#if unitList?exists && unitList?size gt 0>
                                        		<#list unitList as group>
                                            		<option value="${group}">${group}</option>
                                        		</#list>
                                    		</#if>
                                		</select>
	                            	</td>
	                            	<td>
	                            		<select class="form-control selectcolor" style="width:100%">
                                			<option value="0">请选择</option>
                                			<#if colorList?exists && colorList?size gt 0>
                                        		<#list colorList as group>
                                            		<option value="${group}">${group}</option>
                                        		</#list>
                                    		</#if>
                                		</select>
	                            	</td>
	                            	<td>
	                            		<select class="form-control selectQuality" style="width:100%">
                                			<option value="0">请选择</option>
                                			<#if qualityList?exists && qualityList?size gt 0>
                                        		<#list qualityList as group>
                                            		<option value="${group}">${group}</option>
                                        		</#list>
                                    		</#if>
                                		</select>
	                            	</td>
	                            	<td>
		                            	<select id="selectModel" class="form-control selectHouse" style="width:100%">
                                			<option value="0">请选择</option>
                                			<#if warehouseList?exists && warehouseList?size gt 0>
		                                        <#list warehouseList as group>
		                                            <option value="${group}">${group}</option>
		                                        </#list>
		                                    </#if>
	                                	</select>
		                            </td>
	                            	<td>
	                            		<input class="form-control selectNum" style="width:100%"/>
	                            	</td>
	                            	<td>
	                            		<input class="form-control selectPrice" style="width:100%"/>
	                            	</td>
	                            	<td>
	                            		<input class="form-control selectZhe" value="1" style="width:100%"/>
	                            	</td>
	                            	<td>
	                            		<input class="form-control selectXiao" style="width:100%"/>
	                            	</td>
	                        		<td>
	                        			<div class="box-tools pull-right">
	                            			<button type="button" class="btn btn-box-tool delete"><i class="fa fa-fw fa-close"></i></button>
	                        			</div>
	                        		</td>
	                        	</tr>
	                        	</table>
                    	</div>
              <#--  </div>
                <div class="box box-primary mybox"> -->
                	<div id="customerinfo" class="box-body">
                	<form class="form-horizontal" id="dataForm">
                        <div class="form-group" style="margin-right:0px;margin-left:0px;">
	                        	<div class="row">
		                            <label class="col-sm-1 control-label">订单编号</label>
		                            <div class="col-sm-2">
		                            	 <input type="text" class="form-control" name="orderid"  disabled value="${orderid}" maxlength="100" id="orderid" name="orderid">
		                            </div>
		                            <label class="col-sm-1 control-label">客户公司</label>
		                            <div class="col-sm-2">
		                            	 <input type="hidden" class="form-control" maxlength="100" id="customerid" name="customerid">
		                            	 <input type="text" class="form-control"  disabled placeholder="请输入客户公司" maxlength="100" id="customername" name="customername">
		                            </div>
		                            <label class="col-sm-1 control-label">联系人</label>
		                            <div class="col-sm-2">
		                                <input type="text" class="form-control"  placeholder="请输入联系人" maxlength="100" id="contacts" name="contacts">
		                            </div>
		                            <label class="col-sm-1 control-label">联系电话</label>
		                            <div class="col-sm-2">
		                            	 <input type="text" class="form-control"  placeholder="请输入联系电话" maxlength="100" id="telephone" name="telephone">
		                            </div>
		                        </div>
	                        	<div class="row">
		                            <label class="col-sm-1 control-label">地址</label>
		                            <div class="col-sm-2">
		                                <input type="text" class="form-control"  placeholder="请输入地址" maxlength="100" id="address" name="address">
		                            </div>
		                            <label class="col-sm-1 control-label">仓库地址</label>
		                            <div class="col-sm-2">
		                            	 <input type="text" class="form-control"  placeholder="请输入仓库地址" maxlength="100" id="warehouse" name="warehouse">
		                            </div>
		                        </div>
		                        <div class="row">
		                         	<label class="col-sm-1 control-label">备注</label>
		                            <div class="col-sm-8">
		                            	 <input type="text" class="form-control" maxlength="200" name="remark">
		                        	</div>
		                         	<label class="col-sm-1 control-label">总计</label>
		                            <div class="col-sm-2">
		                            	 <input type="text" class="form-control" id="countZong"  maxlength="100" name="countZong">
		                        	</div>
	                     		</div>
	                     	</div>
	                     </from>
                        </div>
                </div>
	    </section>
	</div>
	
	<!-- footer -->
	<@netCommon.commonFooter />
</div>

<@netCommon.commonScript />
<!-- DataTables -->
<script src="${request.contextPath}/static/adminlte/plugins/select2/select2.min.js"></script>
<script src="${request.contextPath}/static/adminlte/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script src="${request.contextPath}/static/plugins/jquery/jquery.validate.min.js"></script>
<script src="${request.contextPath}/static/js/inorderin.add.1.js"></script>
</body>
</html>
